
#include <stdlib.h>
#include <stdio.h>

//#define    MAXPR    500000000
#define    MAXPRSQRT    250000
//#define    MAXPRSQRT    25

typedef struct _prime {
	int v;
	int n;
} Prime;

typedef struct _primeSet {
	int c;
	Prime tab[MAXPRSQRT];
} PrimeSet;

PrimeSet primeSet;

unsigned int pri[MAXPRSQRT];
//unsigned int pr[MAXPRSQRT];
//unsigned int fl[MAXPRSQRT];
//unsigned int p = 0;

void fipr() {
//    p = 0;
    unsigned int i, j;
    for(i = 2; i < MAXPRSQRT; i++) {
        if(pri[i] == 0) {   
            for(j = i * i; j < MAXPRSQRT; j += i) {
                pri[j] = 1;
            }
        }
    }
}

void shpr(unsigned int * tab, int n) {
    int i;
    for(i =0; i < n; i++) {
        printf("tab[%d]=%d \n", i, tab[i]);
    }
    printf("\n");
}

int gres(int n) {
    int i, ret = 1;
    primeSet.c = 0;
    for(i = 2; i < MAXPRSQRT; i++) {
        //printf("a %d\n", pr[i]);
        if(pri[i] == 0 && n % i == 0) {
	        //printf("[p=%d]\n", i);	
        	primeSet.tab[primeSet.c].v = i;
        	primeSet.tab[primeSet.c].n = 0;
	        while(n % i == 0) {
	        	//printf("[n=%d]\n", n);
				n = n / i;
				primeSet.tab[primeSet.c].n++;
			}
			primeSet.c++;
        }
    }
    if(n > MAXPRSQRT) {
    	primeSet.tab[primeSet.c].v = n;
    	primeSet.tab[primeSet.c].n = 1;
    	primeSet.c++;
    }
    for(i = 0; i < primeSet.c; i++) {
    	//printf("prime %d(%d)\n", primeSet.tab[i].v, primeSet.tab[i].n);
    	if(primeSet.tab[i].n % 2 != 0)
    		ret = ret * primeSet.tab[i].v;
    }
    return ret;
}

int main() {
    int n;
    //n = 24;
    fipr();
    //shpr(pri, MAXPR);
   	//shpr(pr, p);
    scanf("%llu", &n);
    printf("%llu\n", (unsigned long long)gres(n) * (unsigned long long )n);
    return 0;
}
